<?php

namespace core;

use core\db\Mysql;
class Db{

    public static function connect($config='',$force=false){
        if(empty($config)){
            $config=Config::get('db');
        }
        $class ="core\\db\\Mysql";

        return new $class($config);
    }

    public static function __callStatic($method, $arguments)
    {

       return  call_user_func_array([self::connect(),$method],$arguments);
    }
}